package com.tanhua.controller;

import com.tanhua.util.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {
    /**
     * GET/huanxin/user
     * 获取环信账号密码
     */
    @GetMapping("/user")
    public ResponseEntity getHuanXin(){

        Map<String,String> map = new HashMap<>();
        map.put("username", UserHolder.getUser().getId().toString());
        map.put("password","123456");
        return ResponseEntity.ok(map);
    }

}
